Skip to content

Wrap button and option text when content overflows#12

Merged
masnwilliams merged 2 commits into
mainfrom
hypeship/wrap-button-text
May 15, 2026
Merged

Wrap button and option text when content overflows#12
masnwilliams merged 2 commits into
mainfrom
hypeship/wrap-button-text

Conversation

@masnwilliams
Copy link
Copy Markdown
Contributor

@masnwilliams masnwilliams commented May 14, 2026

Summary

  • .kma-button used white-space: nowrap plus a fixed height, so long
    MFA / SSO / sign-in option labels overflowed the card on narrower
    viewports.
  • Switched to min-height and overflow-wrap: anywhere so labels wrap
    and the row grows to fit. Also added padding + min-width: 0 on
    .kma-sso-button so its label can shrink.
  • Extended two mock MFA options in the demo (States tab → Awaiting Input — MFA only)
    with longer labels so the wrapping case is visible while scrubbing.

Before / After

Viewport 460x750, Statesawaiting_input_mfa. The long totp label
("Get a verification code from the Google Authenticator app") clipped
past the card on the right in the old build and now wraps cleanly to two
lines inside the row.

Test plan

  • bun run --filter '@onkernel/managed-auth-react' typecheck
  • bun run --filter '@onkernel/managed-auth-react' build
  • bun run format:check
  • Manual: demo at 460px wide, every mfaOptions row now wraps inside the card

Note

Low Risk
Low risk styling-only changes that adjust button sizing/wrapping; main risk is minor visual layout shifts across consumers.

Overview
Prevents long MFA/SSO labels from overflowing narrow viewports by switching buttons from fixed height to min-height and enabling text wrapping via overflow-wrap: anywhere (removing white-space: nowrap).

Tweaks SSO button layout to better accommodate wrapping (padding and new .kma-sso-button__label { min-width: 0; }), extends demo MFA mock labels to exercise the wrap case, and adds a vercel.json to build the library + demo with Bun.

Reviewed by Cursor Bugbot for commit fa3f32e. Bugbot is set up for automated code reviews on this repo. Configure here.

The shared `.kma-button` rule used `white-space: nowrap` + a fixed
height, so long MFA/SSO/sign-in option labels (e.g. "Get a verification
code from the Google Authenticator app") overflowed the card. Switch
buttons to `min-height` and `overflow-wrap: anywhere` so labels wrap and
the row grows to fit. Extend two demo MFA options with longer labels so
the wrapping case is exercised when scrubbing through States.
@masnwilliams masnwilliams marked this pull request as ready for review May 15, 2026 14:23
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: PR modifies UI styling in managed-auth-react package, not kernel API endpoints or Temporal workflows as specified in the filter.

To monitor this PR anyway, reply with @firetiger monitor this.

Configures Vercel to build the library before the demo app and
output from packages/demo/dist, so workspace:* dependency resolves
correctly in CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
managed-auth-react-demo Ready Ready Preview, Comment May 15, 2026 2:28pm

Comment thread packages/managed-auth-react/src/styles/styles.css
Comment thread vercel.json
@masnwilliams masnwilliams merged commit e42a234 into main May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant